USE [temp_frame]
GO

/****** Object:  Table [dbo].[baseUserPower]    Script Date: 07/03/2012 18:25:43 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[baseUserPower](
	[id] [bigint] IDENTITY(1,1) NOT NULL,
	[baseUser] [bigint] NULL,
	[basePower] [bigint] NULL,
	[isactive] [int] NULL,
	[lineno] [int] NULL,
	[createdat] [datetime] NULL,
	[createdby] [varchar](50) NULL,
	[updatedat] [datetime] NULL,
	[updateby] [varchar](50) NULL,
	[ip] [varchar](50) NULL,
 CONSTRAINT [PK_baseUserPower] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色表id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'baseUser'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'权限表id（和权限表的id相关联）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'basePower'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用（0为：停用；1为：启用）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'isactive'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'lineno'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'createdat'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'createdby'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'updatedat'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'updateby'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后修改数据的ip地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUserPower', @level2type=N'COLUMN',@level2name=N'ip'
GO

ALTER TABLE [dbo].[baseUserPower] ADD  CONSTRAINT [DF_baseUserPower_isactive]  DEFAULT (1) FOR [isactive]
GO

ALTER TABLE [dbo].[baseUserPower] ADD  CONSTRAINT [DF_baseUserPower_createdat_1]  DEFAULT (getdate()) FOR [createdat]
GO

ALTER TABLE [dbo].[baseUserPower] ADD  CONSTRAINT [DF_baseUserPower_updatedat_1]  DEFAULT (getdate()) FOR [updatedat]
GO

